<template>
    <a-sub-menu key="sub3">
        <template #title>公告管理</template>
        <a-menu-item key="setting:7" @click="viewNotice">查看公告</a-menu-item>
        <a-menu-item key="setting:8" @click="handleAddAounce">发布公告</a-menu-item>
    </a-sub-menu>
</template>

<script setup>
import { ref } from 'vue';
/* 查看和添加状态 */
import { viewNotice } from './Notice/hooks/viewNotice'
/* 发布公告组件 */
/* import PublishNotice from './Notice/PublishNotice.vue' */
/* 缓冲区分析组件 */
import { addAounce } from 'assets/libs/utils/addAounce'
/* 拿到地图对象 */
import { useMapStore } from 'stores/mapStore'
/* 数据响应式 */
import { storeToRefs } from 'pinia'
const { map } = storeToRefs(useMapStore())
const attrs = ref([])
/* 点击把地图文档和定义的信息数组传过去 */
/* ------------完全没必要其实在announce模块里定义----------------- */
const handleAddAounce = () => {
    /*  viewPublish() */
    console.log("点击了发布公告");
    addAounce.announce(map.value, attrs.value)
}
// onMounted(() => {
//     console.log("公告管理");
// })
</script>